<template>
<body>
    <Header></Header>
    <div class="widewrapper main">
        <div class="container">
            <div class="row">
                <h2>{{ data.title }}</h2>
                <h3>{{ data.info }}</h3>
                <div class="col-md-8 blog-main">
                    <v-md-preview :text="data.datahtml"></v-md-preview>
                    
                </div>
                <Sider/>
            </div>
        </div>
    </div>
    <Footer/>
</body>
</template>

<script setup>
import { onMounted, ref, getCurrentInstance} from "vue"
import { useRoute } from "vue-router"
import Header from "./Header.vue"
import Sider from "./Sider.vue"
import Footer from "./Footer.vue"

const {proxy} = getCurrentInstance()
const route = useRoute()
const data = ref([])
onMounted(()=>{
    proxy.$http.post("/article",{
        id:route.params.id,
    }).then(res =>{
        data.value = res.data.data
        console.log("status:" + res.status)
        console.log("msg:"+res.data.msg)
    })
})

</script>